{% extends 'djangobb_forum/base.html' %}
{% load pagination_tags %}
{% load forum_extras %}
{% load i18n %}

{% block content %}
{% autopaginate posts forum_settings.TOPIC_PAGE_SIZE %}
<div class="linkst">
	<div class="inbox">
		<div class="pagelink conl">{% paginate %}</div>
				<ul><li><a href="{% url djangobb:index %}">{% trans "Root" %} </a></li><li>&raquo; {% link topic.forum %} </li><li>&raquo; {{ topic }} 
				<a href="{% url djangobb:forum_topic_feed topic.id %}"><img src="{{ STATIC_URL }}djangobb_forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" style="vertical-align:middle;" /></a>
				</li></ul>
		<div class="clearer"></div>
	</div>
</div>

<form method="post">
{% csrf_token %}
{% for post in posts %}
<div id="p{{ post.id }}" class="blockpost roweven firstpost">
	<a name="post-{{ post.id }}"></a>
	<h2><span><span class="conr">#{{ forloop.counter }}&nbsp;</span><a href="{{ post.get_absolute_url }}">{% forum_time post.created %}</a></span></h2>
	<div class="box">
		<div class="inbox">
			<div class="postleft">
				<dl>
					<dt><strong><a href="{% url djangobb:forum_profile post.user.username %}">{{ post.user.username }}</a></strong></dt>
					<dd class="usertitle"><strong>{{ post.user.forum_profile.status }}</strong></dd>
				</dl>
			</div>
			<div class="postright">
				<h3>{{ post.topic.name }}</h3>
				<div class="postmsg">
					{{ post.body_html|safe }}
			{% if post.updated %}
				<p class="postedit"><em>{% trans "Edited" %} {{ post.user.username }} ({% forum_time post.updated %})</em></p>
			{% endif %}
				</div>
				{% if not forloop.first %} 
				<p class="multidelete"><label><strong>{% trans "Select" %}</strong>&nbsp;&nbsp;<input type="checkbox" name="post" value="{{ post.id }}" /></label></p>
				{% endif %}
			</div>
			<div class="clearer"></div>
		</div>
	</div>
</div>
{% endfor %}

<div class="postlinksb">
	<div class="inbox">
		<div class="pagelink conl">{% paginate %}</div>
		<p class="conr"><input type="submit" value="{% trans "Delete" %}" /></p>
		<div class="clearer"></div>
	</div>
</div>
</form>
{% endblock %}
